import request from '../util/request.js'

export function login(code, data) {
	return request.post("mini/login?code=" + code, data, {
		noAuth: true
	})
}

export function wechatLogin(code) {
	return request.post("wechat/login?code=" + code, {}, {
		noAuth: true
	})
}

export function getOrderCount() {
	return request.get("orderCount", {}, {
		noAuth: false
	})
}

export function getUserInfo() {
	return request.post('userInfo', {}, {
		noAuth: false
	})
}

export function getBalanceCenter() {
	return request.get('getBalanceCenter', {}, {
		noAuth: false
	})
}
export function getAnUserInfo() {
	return request.get('an/userInfo', {}, {
		noAuth: false,
		noVerify: true
	})
}

export function getSpreadList(data) {
	return request.get('user/getSpreadList', data, {
		noAuth: false
	})
}


export function sendCode(data) {
	return request.get('user/sendCode', data, {
		noAuth: true,
		noVerify: true
	})
}


export function bindPhone(data) {
	return request.get('user/bindPhone', data, {
		noAuth: false
	})
}


export function getUserCenter() {
	return request.get('user/center', {}, {
		noAuth: false
	})
}

export function getQrcode() {
	return request.get('user/get/qrcode', {}, {
		noAuth: false
	})
}

export function getWechatQrcode() {
	return request.get('user/get/wechat/qrcode', {}, {
		noAuth: false
	})
}


export function getUserTaskCenter() {
	return request.get('user/task/center', {}, {
		noAuth: false
	})
}

export function getTranUserInfo(data) {
	return request.get('user/tran/userInfo', data, {
		noAuth: false
	})
}


export function userTran(data) {
	return request.post('user/tran', data, {
		noAuth: false
	})
}

export function h5Login(data) {
	return request.post('h5/login', data, {
		noAuth: true
	})
}

export function h5LoginInfo(data) {
	return request.post('h5/login/info', data, {
		noAuth: true
	})
}

export function logout() {
	return request.get('logout', {}, {
		noAuth: false
	})
}


export function bindAuthInfo(data) {
	return request.post('user/bindAuthInfo', data, {
		noAuth: false
	})
}


export function getSpreadUserList(data) {
	return request.get('user/spread/list', data, {
		noAuth: false
	})
}

export function getUserLabel(data) {
	return request.get('user/get/label', data, {
		noAuth: false
	})
}


export function userRegister(data) {
	return request.post('user/register', data, {
		noAuth: true
	})
}

export function userUpdatePwd(data) {
	return request.post('user/update/pwd', data, {
		noAuth: true
	})
}

export function saveUserInfo(data) {
	return request.post('user/save/info', data, {
		noAuth: false
	})
}

export function turn(data) {
	return request.post('user/turn', data, {
		noAuth: false
	})
}

export function getSearchUserList(data) {
	return request.get('user/search', data, {
		noAuth: false
	})
}

export function getAgentUserList(data) {
	return request.get('user/agent/list', data, {
		noAuth: false
	})
}

export function getUserCenterDetail(data) {
	return request.get('user/center/detail', data, {
		noAuth: false
	})
}


export function getUpImage() {
	return request.get('user/up/image', {}, {
		noAuth: false,
		noVerify: true
	})
}

export function getProductQrcode(data) {
	return request.get('user/product/qrcode', data, {
		noAuth: false
	})
}

export function getAgentUserBillList(data) {
	return request.get('user/agent/bill/list', data, {
		noAuth: false
	})
}



export function getMenuCount() {
	return request.get('user/menu/count', {}, {
		noAuth: false
	})
}


export function getPayImage() {
	return request.get('user/pay/image', {}, {
		noAuth: false
	})
}
export function getChildUserList(data) {
	return request.get('user/child/user', data, {
		noAuth: false
	})
}

export function userAuth(data) {
	return request.post('user/auth', data, {
		noAuth: true
	})
}

export function getBrowseUserList(data) {
	return request.get('user/browse/list', data, {
		noAuth: false
	})
}
export function upload(data) {
	return request.post('upload/image', data, {
		noAuth: false
	})
}

export function bindSpread(data) {
	return request.get('user/bind/spread', data, {
		noAuth: false,
		noVerify: true
	})
}